package com.havey.ye.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author yehuaiwei
 * @since 2025-01-23
 */
@TableName("user_info")
@ApiModel(value = "UserInfo对象", description = "用户信息表")
@Data
public class UserInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户编号
     */
    @ApiModelProperty("用户编号")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    /**
     * 用户名称
     */
    @ApiModelProperty("用户名称")
    private String username;

    /**
     * 用户登录密码（建议存储哈希值）
     */
    @ApiModelProperty("用户登录密码（建议存储哈希值）")
    private String passwordHash;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private LocalDateTime createdAt;

    /**
     * 修改时间
     */
    @ApiModelProperty("修改时间")
    private LocalDateTime updatedAt;

    @Override
    public String toString() {
        return "UserInfo{" +
                "userId = " + userId +
                ", username = " + username +
                ", passwordHash = " + passwordHash +
                ", createdAt = " + createdAt +
                ", updatedAt = " + updatedAt +
                "}";
    }
}
